package com.lemobar.pay.model.wxpay.response;

import lombok.Data;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.Root;

/**
 * 微信申请退款 返回参数
 * JSAPI支付 https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_4
 * 小程序支付 https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_4
 * APP支付  https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_4&index=6
 * 付款码支付 https://pay.weixin.qq.com/wiki/doc/api/micropay.php?chapter=9_4
 */
@Data
@Root(name = "xml", strict = false) //name:要解析的xml数据的头部
public class WxPayRefundResponse {

    @Element(name = "return_code")
    private String returnCode;

    @Element(name = "return_msg", required = false)
    private String returnMsg;

    /**
     * 业务结果                                    <br/>
     * SUCCESS/FAIL                               <br/>
     * -SUCCESS退款申请接收成功，结果通过退款查询接口查询 <br/>
     * -FAIL 提交业务失败
     */
    @Element(name = "result_code", required = false)
    private String resultCode;

    @Element(name = "err_code", required = false)
    private String errCode;

    @Element(name = "err_code_des", required = false)
    private String errCodeDes;

    @Element(name = "appid", required = false)
    private String appid;

    @Element(name = "mch_id", required = false)
    private String mchId;

    @Element(name = "nonce_str", required = false)
    private String nonceStr;

    @Element(name = "sign", required = false)
    private String sign;

    @Element(name = "transaction_id", required = false)
    private String transactionId;

    @Element(name = "out_trade_no", required = false)
    private String outTradeNo;

    @Element(name = "out_refund_no", required = false)
    private String outRefundNo;

    @Element(name = "refund_id", required = false)
    private String refundId;

    @Element(name = "refund_fee", required = false)
    private Integer refundFee;

    @Element(name = "settlement_refund_fee", required = false)
    private Integer settlementRefundFee;

    @Element(name = "total_fee", required = false)
    private Integer totalFee;

    @Element(name = "settlement_total_fee", required = false)
    private Integer settlementTotalFee;

    @Element(name = "fee_type", required = false)
    private String feeType;

    @Element(name = "cash_fee", required = false)
    private Integer cashFee;

    @Element(name = "cash_fee_type", required = false)
    private String cashFeeType;

    @Element(name = "cash_refund_fee", required = false)
    private Integer cashRefundFee;


    //代金券类型	coupon_type_$n


    @Element(name = "coupon_refund_fee", required = false)
    private Integer couponRefundFee;


    //单个代金券退款金额	coupon_refund_fee_$n


    @Element(name = "coupon_refund_count", required = false)
    private Integer couponRefundCount;


    //退款代金券ID	coupon_refund_id_$n


}
